package cn.yitun.chat.yitunserverimbase.dao.group;

import cn.yitun.chat.yitunservercommonlib.crud.yitun.CrudDao;
import cn.yitun.chat.yitunservercommonlib.dataentity.dto.group.GroupRelationDto;
import cn.yitun.chat.yitunservercommonlib.dataentity.po.group.GroupRelationInfo;
import cn.yitun.chat.yitunservercommonlib.dataentity.vo.group.GroupRelationVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 群组分类成员表
 * @author chenyitun
 * @email chenyitun@163.com
 * @date 2020-05-27 14:42:53
 */
@Mapper
public interface GroupCategoryMemberDao extends CrudDao<GroupRelationDto, GroupRelationInfo, GroupRelationVo> {

	int absDel(Long id);

	int batchAbsDel(Long[] ids);

	/**
	 * 移动群到其它分组
	 * @param userId
	 * @param groupId
	 * @param groupCategoryId
	 * @return
	 */
	int updateGroupCategoryId(@Param("userId") Long userId,@Param("groupId") Long groupId,@Param("categoryId") Long groupCategoryId);

	/**
	 * 退出群
	 * @param userId
	 * @param groupId
	 * @return
	 */
	int deleteGroupCategoryMember(@Param("userId") Long userId,@Param("groupId") Long groupId);
}
